import request from '@/utils/request'

/**
 * 封装登录接口
 * @param {object} data
 * @returns Promise
 */
export const loginApi = data => request({
  url: '/sys/login',
  method: 'POST',
  data
})

/**
 * 获取用户资料
 * @returns Promise
 */
export const getUserInfoApi = () => request({
  method: 'POST',
  url: '/sys/profile'
})

/**
 * 获取员工基本信息
 * @param {员工id} id
 * @returns Promise
 */
export const getUserDetailByidApi = (id) => request({
  url: `/sys/user/${id}`
})
